Skip to content

Conversation

@kunkunlin1221
Copy link
Collaborator

@kunkunlin1221 kunkunlin1221 commented Aug 29, 2025

This pull request primarily improves the handling and serialization of keypoints and keypoints lists in the Capybara library, ensuring consistent formatting, better support in mixins, and more robust test coverage. The changes also include code style improvements for readability and maintainability.

Keypoints and KeypointsList Support

  • Added Keypoints and KeypointsList to imports and serialization logic in dict_to_jsonable, allowing these types to be properly converted to JSON-friendly formats. [1] [2]
  • Updated test cases to include Keypoints and KeypointsList objects, validating their serialization and ensuring compatibility with custom functions. [1] [2]

Code Style and Consistency

  • Standardized string quotes from single to double across files for consistency. [1] [2]
  • Refactored conditionals and error messages in the keypoints.py structures for clarity and uniformity. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]

Mixins Improvements

  • Simplified methods and attributes in mixins, especially DataclassToJsonMixin, for easier usage and less boilerplate.
  • Improved handling of custom serialization functions and parameter passing in mixins.

Test and Maintenance

  • Enhanced test parameterization and updated test data for broader coverage, including new types and serialization scenarios. [1] [2]
  • Minor cleanups in test and mixin files for better readability and maintainability. [1] [2] [3]

These changes collectively make the Capybara library more robust and easier to use, especially when working with keypoints data in serialization and testing workflows.

@kunkunlin1221 kunkunlin1221 self-assigned this Aug 29, 2025
@kunkunlin1221 kunkunlin1221 added the bug Something isn't working label Aug 29, 2025
@kunkunlin1221 kunkunlin1221 force-pushed the bugfix/fix_jsonable branch 2 times, most recently from b13faa9 to 9eb1842 Compare August 29, 2025 03:15
@kunkunlin1221 kunkunlin1221 changed the title [F] Fix jsonable Enhance Keypoints Serialization and Refactor Codebase for Consistency and Readability Aug 29, 2025
@kunkunlin1221 kunkunlin1221 merged commit 2ad2bd1 into main Aug 29, 2025
9 checks passed
@kunkunlin1221 kunkunlin1221 deleted the bugfix/fix_jsonable branch August 29, 2025 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants